package com.itheima.controller;

import com.itheima.domain.Goods;
import com.itheima.servicer.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/provider")
public class GoodsController {
    @Autowired
    private GoodsService goodsService;
    @GetMapping("/{id}")
    public Goods findOne(@PathVariable("id")String id){
        return goodsService.findOne(id);
    }
}
